package com.moss.cloud.base.api.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.moss.cloud.common.core.annotation.document.ApiComment;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@ApiComment("账号锁定历史记录响应参数")
public class AccountLockHistoryRecordVO implements Serializable {
    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    /**用户ID*/
    @ApiComment(value = "用户ID",required = true)
    private Long userId;
    /**锁定时间*/
    @ApiComment(value = "锁定时间",required = true)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = DATE_FORMAT)
    private LocalDateTime lockTime;
    /**预计解锁时间*/
    @ApiComment(value = "预计解锁时间",required = true)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = DATE_FORMAT)
    private LocalDateTime unlockTime;
    /**锁定原因*/
    @ApiComment(value = "锁定原因",required = true)
    private String lockReason;
    /**操作人账号*/
    @ApiComment(value = "操作人账号",required = true)
    private String createdBy;
    /**锁定账号*/
    @ApiComment(value = "锁定账号",required = true)
    private String username;
    /**姓名*/
    @ApiComment(value = "姓名",required = true)
    private String name;
    /**头像*/
    @ApiComment(value = "头像",required = true)
    private String avatar;
}
